package org.example.config;

import io.avaje.inject.Bean;
import io.avaje.inject.Factory;
import io.ebean.DB;
import io.ebean.Database;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Factory
public class DbConfig {

    private static final Logger log = LoggerFactory.getLogger(DbConfig.class);

    @Bean
    public Database database() {
        log.info("Configuring Ebean Database instance...");
        Database database = DB.getDefault();
        log.info("Ebean Database instance configured successfully.");
        return database;
    }
}